#!/bin/bash
# in this file, we can open vrpn, dwe_sensors and dwe_estimator. px4 ctrol with gtd

# launch vrpn 
# ip ="192.168.2.202"  
# pub: /uav201/mocap/pos /uav201/mocap/vel
gnome-terminal --geometry 50x10+10+10 -- bash vrpn_start.sh & sleep 2

# launch imu and trans
# sub: /uav201/mocap/pos /uav201/mocap/vel /IMU_data
# pub: /mavros/vision_pose/pose /mavros/vision_pose/odom /euler/mavros-IMU_data-vicon
gnome-terminal --geometry 50x10+10+130 -- bash trans_imu_start.sh & sleep 2

# launch uwb1
# pub: /nlink_linktrack_nodeframe2
# !note: ensure "rostopic echo /nlink_linktrack_nodeframe2" has proper feedback
gnome-terminal --geometry 50x10+10+250 -- bash uwb1_start.sh & sleep 2

# launch uwb2
# pub: /nlink_linktrack_nodeframe2
# !note: ensure "rostopic echo /nlink_linktrack_nodeframe2" has proper feedback
gnome-terminal --geometry 50x10+10+370 -- bash uwb2_start.sh & sleep 2

# launch mavros
# pub: /mavros/local_position/pose
# !note: ensure "rostopic echo /mavros/local_position/pose" equals to "/mavros/vision_pose/pose"
# gnome-terminal --geometry 50x10+10+490 -- bash mavros_start.sh & sleep 1

# launch dwe_estimator 
# sub: /camA/single_cam_process_ros/ir_mono/T_base_to_estimation ABCD
# pub: /estimate/xt_real_f/pose /estimate/xt_real_f/vel
# gnome-terminal --geometry 50x10+10+10 -- bash dwe_start.sh & sleep 1

# launch px4ctrl 
# sub: /camA/single_cam_process_ros/ir_mono/T_base_to_estimation ABCD
# pub: /estimate/xt_real_f/pose /estimate/xt_real_f/vel
# gnome-terminal --geometry 50x10+10+10 -- bash px4ctrl_start.sh & sleep 1
